<?php
		//系统分隔符
	define('DS',DIRECTORY_SEPARATOR);
	//系统根目录
	define('ROOT',dirname(dirname(__FILE__)));
	require_once(ROOT. DS.'config'.DS.'eloquent.php');
	use core\App;
	$kind = $_GET['kind'];
	$dicArr= explode(',',$kind);
	$funStr = '';
	foreach($dicArr as $i=>$val){
		$dics = App::DB()->select("select d.name,d.key,d.value from sys_dic d where d.kind_id = (select p.id from sys_dic p where p.key='".$val."') order by d.key desc");
		$items = '';
		foreach($dics as $i=>$r){
			$value = $r->value;
			$name = $r->name;
			$items .=",{text:'$name',value:'$value'}";
		}
		$funStr .="_dic.$val=[".substr($items,1)."]";
	}
	echo $funStr;